@extends('layouts.default')  
@section('content')
<div style="text-align:left;" class="box primary">
    <header>
        <div class="icons">
            <i class="fa fa-edit"></i>
        </div>
        <h5>{{Lang::get('rentals.check_in')}}</h5>
        <div class="toolbar">
            <nav style="padding: 8px;">
                <a href="javascript:;" class="btn btn-default btn-xs collapse-box">
                    <i class="fa fa-minus"></i>
                </a> 
                <a href="javascript:;" class="btn btn-default btn-xs full-box">
                    <i class="fa fa-expand"></i>
                </a> 
                <a href="javascript:;" class="btn btn-danger btn-xs close-box">
                    <i class="fa fa-times"></i>
                </a> 
            </nav>
        </div>
    </header>
    <div id="div-1" class="body">
        @foreach ($values as $v)
        {{ Form::model($v, array(
                        'route' => array('check_in.update', $v->rentalId),
                        'method' => 'PUT',
                        'class'=>'form-horizontal',
                        'id'=>'form-validate')) 
        }}
        <div style="text-align:center;" class="alert alert-info" ><b>Klienti</b></div>  
        <div class="form-group">
            {{ Form::label('cfirstname', Lang::get('rentals.cfirstname').'*', 
                            array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('cfirstname',isset($v->cfname)?$v->cfname:'' , array(
                                'placeholder' =>Lang::get('rentals.cfirstname'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>               
        </div> 
        <div class="form-group">
            {{ Form::label('clastname', Lang::get('rentals.clastname').'*', 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('clastname',isset($v->clname)?$v->clname:'' , array(
                                'placeholder' =>Lang::get('rentals.clastname'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div> 
        <div class="form-group">
            {{ Form::label('drpasportid', Lang::get('rentals.drpasportid').'*', 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('drpasportid',isset($v->drpasportid)?$v->drpasportid:'', array(
                                'placeholder' =>Lang::get('rentals.drpasportid'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('caddress', Lang::get('rentals.caddress'), 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('caddress',isset($v->caddress)?$v->caddress:'', array(
                                'placeholder' =>Lang::get('rentals.caddress'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('drcity', Lang::get('rentals.drcity'), 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('drcity',isset($v->ccity)?$v->ccity:'' , array(
                                'placeholder' =>Lang::get('rentals.drcity'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('drcountry', Lang::get('rentals.drcountry'), 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('drcountry',isset($v->ccountry)?$v->ccountry:'' , array(
                                'placeholder' =>Lang::get('rentals.drcountry'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('dremail', Lang::get('rentals.dremail'), 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('dremail',isset($v->cemail)?$v->cemail:'' , array(
                                'placeholder' =>Lang::get('rentals.dremail'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('drhphone', Lang::get('rentals.drhphone'), 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('drhphone',isset($v->chphone)?$v->chphone:'' , array(
                                'placeholder' =>Lang::get('rentals.drhphone'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('workphone', Lang::get('rentals.workphone'), 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('workphone',isset($v->cwphone)?$v->cwphone:'' , array(
                                'placeholder' =>Lang::get('rentals.workphone'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('companyname', Lang::get('rentals.companyname'), 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('companyname',isset($v->companyname)?$v->companyname:'' , array(
                                'placeholder' =>Lang::get('rentals.companyname'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>

        <div style="text-align:center;" class="alert alert-info" ><b>Shoferi Kryesor</b></div>
        <div class="form-group">
            {{ Form::label('drfirstname', Lang::get('rentals.drfirstname').'*', 
                            array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('drfirstname',isset($v->drfirstname)?$v->drfirstname:'', array(
                                'placeholder' =>Lang::get('rentals.drfirstname'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>               
        </div> 
        <div class="form-group">
            {{ Form::label('drlastname', Lang::get('rentals.drlastname').'*', 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('drlastname',isset($v->drlastname)?$v->drlastname:'', array(
                                'placeholder' =>Lang::get('rentals.drlastname'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div> 
        <div class="form-group">
            {{ Form::label('drbdate', Lang::get('rentals.drbdate'), array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">               
                {{ Helpers\Helper::date('drbdate',isset($v->drbdate)?$v->drbdate:'', array(
                                'class' => 'form-control'))
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('drlexpdate', Lang::get('rentals.drlexpdate'), array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">               
                {{ Helpers\Helper::date('drlexpdate',isset($v->drlexpdate)?$v->drlexpdate:'', array(
                                'class' => 'form-control')) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('drliccat', Lang::get('rentals.drliccat'),
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('drliccat',isset($v->drliccat)?$v->drliccat:'', array(
                                'placeholder' =>Lang::get('rentals.drliccat'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('drlicnr', Lang::get('rentals.drlicnr'), 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('drlicnr',isset($v->drlicnr)?$v->drlicnr:'', array(
                                'placeholder' =>Lang::get('rentals.drlicnr'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div style="text-align:center;" class="alert alert-info" ><b>Shoferi Tjeter</b></div>
        <div class="form-group">
            {{ Form::label('dr2fname', Lang::get('rentals.dr2fname'), 
                            array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('dr2fname',isset($v->dr2fname)?$v->dr2fname:'', array(
                                'placeholder' =>Lang::get('rentals.dr2fname'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>               
        </div> 
        <div class="form-group">
            {{ Form::label('dr2lastname', Lang::get('rentals.dr2lastname'), 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('dr2lastname',isset($v->dr2lastname)?$v->dr2lastname:'', array(
                                'placeholder' =>Lang::get('rentals.dr2lastname'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div> 
        <div class="form-group">
            {{ Form::label('draddress', Lang::get('rentals.draddress'), 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('draddress',isset($v->draddress)?$v->draddress:'', array(
                                'placeholder' =>Lang::get('rentals.draddress'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('dr2bdate', Lang::get('rentals.dr2bdate'), array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">               
                {{ Helpers\Helper::date('dr2bdate',isset($v->dr2bdate)?$v->dr2bdate:'' , array(
                                'class' => 'form-control')) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('dr2licexpdate', Lang::get('rentals.dr2licexpdate'), array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">               
                {{ Helpers\Helper::date('dr2licexpdate',isset($v->dr2licexpdate)?$v->dr2licexpdate:'' , array(
                                'class' => 'form-control')) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('dr2liccat', Lang::get('rentals.dr2liccat'), 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('dr2liccat',isset($v->dr2licexpdate)?$v->dr2liccat:'', array(
                                'placeholder' =>Lang::get('rentals.dr2liccat'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('dr2licnr', Lang::get('rentals.dr2licnr'), 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('drlicnr',isset($v->dr2licnr)?$v->dr2licnr:'', array(
                                'placeholder' =>Lang::get('rentals.dr2licnr'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('dr2city', Lang::get('rentals.dr2city'), 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('dr2city',isset($v->dr2city)?$v->dr2city:'', array(
                                'placeholder' =>Lang::get('rentals.dr2city'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('dr2country', Lang::get('rentals.dr2country'), 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('dr2country',isset($v->dr2country)?$v->dr2country:'', array(
                                'placeholder' =>Lang::get('rentals.dr2country'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div  class="form-group" >
            {{ Form::label('fuelin', Lang::get('rentals.fuelin').'*', array(
                            'class'=>'control-label col-lg-4')) }}
            <div  class="col-lg-8 slider" style="width: 40%; left:25px;text-align: right;"><br/>
                <div class="slider-div"></div>
                {{ Form::text('fuelin', isset($v->fuelin) ? $v->fuelin : '', array(
                                'style' => 'border:0; color:blue; width: 10%; font-weight:bold;',
                                'class'=>'fuel')) }}  
                
            </div>                                
        </div>
        <div class="form-group">
            {{ Form::label('kmin', Lang::get('messages.milage'), 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('kmin',isset($v->kmin) ? $v->kmin: '', array(
                                'placeholder' =>Lang::get('messages.milage'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div class="row form-group">
            {{ Form::label('result', Lang::get('rentals.result'), 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-1">
                {{Form::text (  'nrdays',isset($v->rentdays) ? $v->rentdays: '', array(
                                'placeholder' =>Lang::get('rentals.nrdays'),
                                'class' => 'form-control',
                'readonly'=>true))}}
            </div><!-- /.col-lg-4 -->
            <div class="col-lg-2">
                {{Form::text ('rate',isset($v->rate_value) ? $v->rate_value: '', array(
                                'placeholder' =>Lang::get('rentals.rate'),
                                'class' => 'form-control'))}}
            </div><!-- /.col-lg-4 -->
            <div class="col-lg-1">
                <a id="res-btn" class="btn btn-default" data-original-title="" title="">=</a>
            </div>
            <div class="col-lg-2">
                {{Form::text (  'result',isset($result) ? $result: '', array(
                                'placeholder' =>Lang::get('rentals.amount'),
                                'class' => 'form-control',
                                'id'=>'result-reservation'))}}
            </div>
        </div>
        <div class="row form-group">
            {{ Form::label('curency', Lang::get('rentals.curency'),
            array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::select('curency',$currencies, isset($v->curency)?$v->curency:'', array(
                'class' => 'form-control',
                'placeholder'=>Lang::get('rentals.curency')))
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('agency', Lang::get('rentals.agency'), array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::select('agency', array(
                                '' => ''), isset($v->agency)?$v->agency:'', array(
                                'placeholder' =>Lang::get('rentals.agency'),
                                'class' => 'form-control')) 
                }}
            </div>
        </div>
        <div style="text-align:center;" class="alert alert-warning" ><b>Check In</b></div>
        <div class="form-group">
            {{ Form::label('xkarburant', Lang::get('rentals.xkarburant'), 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('xkarburant','', array(
                                'placeholder' =>Lang::get('rentals.xkarburant'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('xkm', Lang::get('rentals.xkm'), 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('xkm','', array(
                                'placeholder' =>Lang::get('rentals.xkm'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('xdamage', Lang::get('rentals.xdamage'), 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('xdamage','', array(
                                'placeholder' =>Lang::get('rentals.xdamage'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('xlate', Lang::get('rentals.xlate'), 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('xlate','', array(
                                'placeholder' =>Lang::get('rentals.xlate'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div class="form-group">
            {{ Form::label('xclean', Lang::get('rentals.xclean'), 
                    array('class'=>'control-label col-lg-4')) }}
            <div class="col-lg-6">
                {{ Form::text('xclean','', array(
                                'placeholder' =>Lang::get('rentals.xclean'),
                                'class' => 'form-control',
                                )) 
                }}
            </div>
        </div>
        <div  class="form-group" >
            {{ Form::label('fuelout', Lang::get('rentals.fuelout').'*', array(
                            'class'=>'control-label col-lg-4')) }}
            <div class="col-lg-8 slider" style="width: 40%; left:25px;text-align: right;"><br/>
                <div class="slider-div"></div>
                {{ Form::text('fuelout', '', array(
                              'style' => 'border:0; color:blue; width: 10%; font-weight:bold;',
                              'class'=>'fuel')) }}    
                              
            </div>
                            
        </div>
        <br/><div id="validation-div"></div>
        {{ Form::hidden('vehicle', isset($v->vehicle) ? $v->id: '', array('id' => 'invisible_vehicle')) }}
        {{ Form::submit(Lang::get('rentals.check_in'), array('class' => 'btn btn-success btn-line')) }}          
        <input type="button" value="{{ Lang::get('messages.cancel_btn')}}" class="btn btn-danger btn-line" 
               onClick="history.go(-1);
                       return true;">
        {{ Form::close() }}
        @endforeach
    </div>
</div>

@stop


